package com.app.mapper.user;

import com.app.domain.po.user.UserPo;
import com.app.domain.vo.user.UserVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * UserCommonMapper
 */
@Repository
public interface UserCommonMapper extends BaseMapper<UserPo> {

    /**
     * 更新用户访问数量
     *
     * @param userId 用户ID
     */
    void updateUserLookCount(@Param("userId") Long userId);

    /**
     * 更新用户点赞数量
     *
     * @param userId 用户ID
     */
    void updateUserLikeCount(@Param("userId") Long userId);

    /**
     * 根据OpenId查询用户
     *
     * @param openId openId
     */
    UserVo selectUserByOpenId(@Param("openId") String openId);

}